﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace FarmacieDAL.Data
{
    public class ComandaWrapper : INotifyPropertyChanged
    {
        private Medicament medicament;
        private double cantitate;
        private double cost;
        private DateTime data;

        #region Properties

        public Medicament Medicament
        {
            get { return medicament; }
            set
            {
                if (value != medicament)
                {
                    medicament = value;
                    OnPropertyChanged("Medicament");
                }
            }
        }

        public double Cantitate
        {
            get { return cantitate; }
            set
            {
                if (value != cantitate)
                {
                    cantitate = value;
                    OnPropertyChanged("Cantitate");
                }
            }
        }

        public double Cost
        {
            get { return cost; }
            set
            {
                if (value != cost)
                {
                    cost = value;
                    OnPropertyChanged("Cost");
                }
            }
        }

        public DateTime Data
        {
            get { return data; }
            set
            {
                if (value != data)
                {
                    data = value;
                    OnPropertyChanged("Data");
                }
            }
        }

        #endregion

        #region INotifyPropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }

        #endregion
    }
}
